package com.xiaoyg.lession01.chapter12;

/**
 * 最后一个线程尚未结束，所以仍处于活动状态，睡眠一秒后，显示已经线程已经不是活动状态
 */
public class Run {
    public static void main(String[] args) throws InterruptedException {
        MyThread myThread = new MyThread();
        System.out.println("begin =="+myThread.isAlive());
        myThread.start();
        Thread.sleep(1000);
        System.out.println("end =="+myThread.isAlive());
    }
}
